#simulate a dataset with continuous data
dataset <- matrix(rnorm(300 * 100), nrow = 300 )
#the target feature is the last column of the dataset as a vector
case = rbinom(300, 1, 0.6)
ina = which(case==1)
ina = sample(ina, 100)
case[-ina] = 0
id = rep(1:100,3)
target = cbind(case, id)
results <- testIndClogit(target, dataset, xIndex = 44, csIndex = 60)
results
#require(gRbase) #for faster computations in the internal functions
#run the SES algorithm using the testIndClogit conditional independence test
a1<- SES(target, dataset, max_k = 3, threshold = 0.05, test = "testIndClogit");
a2<- MMPC(target, dataset, max_k = 3, threshold = 0.05, test = "testIndClogit");
#print summary of the SES output
summary(a1);
#plot the SES output
plot(a1, mode = "all");
Run the code above in your browser using DataLab